package com.qyx.pmpucat.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.Table;
import com.qyx.pmpucat.entity.base.BaseEntity;
import com.qyx.pmpucat.enums.QuestionnaireTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 问卷实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("t_questionnaire")
public class Questionnaire extends BaseEntity {

    /**
     * 问卷标题
     */
    @Column("title")
    private String title;

    /**
     * 问卷描述
     */
    @Column("description")
    private String description;

    /**
     * 问卷状态: 0-未发布, 1-已发布, 2-已下线
     */
    @Column("status")
    private Integer status;

    /**
     * @see QuestionnaireTypeEnum
     */
    @Column("type")
    private Integer type;

    /**
     * 问题列表
     */
    @RelationOneToMany(targetField = "questionnaireId")
    private List<Question> questions;
} 